package com.lct.simpleforecast.mvp.presenter.base

/**
 * Author：SkySmile
 * Date：2018/7/5
 * Description：基础的presenter，其它所有的presenter继承该类
 */
abstract class BasePresenter<V> {
    protected var view: V? = null

    /**
     * 关联view
     *
     * @param view 要关联的view
     */
    fun attachView(view: V) {
        this.view = view
    }

    /**
     * 解除view的关联
     */
    open fun detachView() {
        this.view = null
    }
}